import express from 'express';
import controller from './controller';
import {authorizeHandlerOptional, authorizeHandleAdmin} from '../../middlewares/authorize';
// 定义路由，使用可选鉴权中间件（未登录也能访问）
export default express
  .Router()
  .get('/get', authorizeHandlerOptional ,controller.get) 
  .post('/add', authorizeHandleAdmin ,controller.add)
  .post('/update', authorizeHandleAdmin ,controller.update);